﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Xml;

namespace Trade.Journal
{
    public class UserBarTypeSection : IConfigurationSectionHandler
    {
        public object Create(object parent, object configContext, XmlNode section)
        {
            List<BarCycle> myConfigObject = new List<BarCycle>();

            foreach (XmlNode childNode in section.ChildNodes)
            {
                foreach (XmlAttribute attrib in childNode.Attributes)
                {
                    myConfigObject.Add(  BarCycle.FromString(attrib.Value));
                }
            }
            return myConfigObject;
        }
    }
}
